package EP::Visualization::ControlPanelGraphic;

use strict;

use EP::Visualization::Graphics;
use EP::Visualization::Hooks;

use PDL;
use PDL::NiceSlice;
use Data::UUID;
use Data::Dumper;

our @ISA = qw ( EP::Visualization::Graphics );

########################################################
# This method sets the data and already calculates the #
# position of the leaves in the final tree             # 
########################################################
sub setData {
  my $self = shift;
  my %params = @_;

  die "No object to control supplied to ControlPanelGraphic::setData" if not $params{control};

  $self->{control} = $params{control};

  return;
}

#################################################
#returns string identifying the object as a tree#
#################################################
sub getType {
  return "controlpanel";
}

#################################################
# Sub: to_svg
#   Produces the SVG elements of this object.
#################################################
sub to_svg {
	my $self = shift;
	my ( $svg1, $height, $width, $xposition, $yposition ) = @_;
	return $self->{controls}->panel_svg ( $svg1, $height, $width, $xposition, $yposition );
}

1;
